﻿package com.wandian.view.components.ui
{
	import com.wandian.ApplicationFacade;
	import com.wandian.controller.CLZNoticeName;
	import com.wandian.data.GameData;
	import com.wandian.model.AccountProxy;
	import com.wandian.model.UserInfoProxy;
	import com.wandian.model.vo.FaceVo;
	import com.wandian.model.vo.FriendVo;
	import com.wandian.model.vo.MessageVo;
	import com.wandian.model.vo.PropVo;
	import com.wandian.model.vo.RoomVo;
	import com.wandian.util.CLZLlistScrollPanel;
	import com.wandian.util.CLZLoadIcon;
	import com.wandian.util.CLZTabBar;
	import com.wandian.util.CLZZoom;
	import com.wandian.util.GlowFilterManage;
	import com.wandian.util.ToolTip;
	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.MouseEvent;
	import flash.events.TextEvent;

	/**   
	 * 游戏公告
	 * @author long
	 * @QQ 108232706
	 * @version 1.0   
	 */ 
    public class GamePageMessageInfoMc extends Object
    {
        private var _mcInfo:Sprite;
        private var _msgVo:MessageVo;

        public function GamePageMessageInfoMc(mcInfo:Sprite, msgVo:MessageVo)
        {
            this._mcInfo = mcInfo;
            this._msgVo = msgVo;
            this.init();
            return;
        }

        private function init() : void
        {
            CLZLoadIcon.addIcon(this._mcInfo, GameData.flashUrl + "img/notice/" + this._msgVo.imgURL, 190, 90, 14, 14);
//            trace("aaaaaaaaaaaaaaaa:" + this._mcInfo, GameData.flashUrl + "assets/img/notice/" + this._msgVo.imgURL);
            this._mcInfo["title_txt"].htmlText = "<font size=\'18\'><b>" + this._msgVo.title + "</b></font>     " + GameData.setDate(this._msgVo.startTime, 4) + " — " + GameData.setDate(this._msgVo.endTime, 4);
            this._mcInfo["conten_txt"].htmlText = this._msgVo.content;
            this._mcInfo["goto_btn"].addEventListener(MouseEvent.CLICK, this.onGotoPageHandler);
            return;
        }

        private function onGotoPageHandler(event:MouseEvent) : void
        {
//            JSFUN.pageFunc(this._msgVo.url);
            return;
        }

    }
}
